





<div class="searchbox">
    <div class="searchbox_box">
        <div  class="searchbox_text"> 开始时间：</div>
        <div  class="searchbox_input"> <input type="text" class="datapick datapick1"   name="date1"> </div>
    </div>

    <div class="searchbox_box">
        <div  class="searchbox_text"> 结束时间：</div>
        <div  class="searchbox_input"><input type="text"   name="date2" class="datapick datapick2" > </div>
    </div>

    <!--  <div class="searchbox_box">
          <div  class="searchbox_text"> 商铺名：</div>
          <div  class="searchbox_input"><input type="text" > </div>
      </div>

      <div class="searchbox_box">
          <div  class="searchbox_text"> 订单号：</div>
          <div  class="searchbox_input"><input type="text" > </div>
      </div>-->

    <div class="searchbox_box">
        <div class="search_button am-btn am-btn-secondary "> <img src="<?php echo base_url();?>/public/assets/image/chazhao.png">查询 </div>
    </div>
    <!-- <div class="searchbox_box">
        <div class="search_button am-btn am-btn-secondary "><img src="<?php /*echo base_url();*/?>/public/assets/image/daochu.png">导出数据 </div>
    </div>-->

</div>


    <div class="fbneirong">
        <form class="am-form am-g">
            <table width="100%" class="am-table am-table-radius am-table-striped am-table-hover">
                <thead>
                <tr class="am-success">
                    <th class="table-check"><input type="checkbox" /></th>

                    <th class="table-id">ID</th>
                    <th class="table-title">主商品</th>
                    <th class="table-type">单量</th>
                    <th class="table-type">数量</th>
                    <th class="table-type">SKU</th>
                    <th class="table-type">代发</th>
                    <th class="table-author am-hide-sm-only">本金</th>
                    <th class="table-author am-hide-sm-only">金币</th>
                    <th class="table-date am-hide-sm-only">价格类型</th>
                    <th class="table-date am-hide-sm-only">开团价格</th>
                    <th class="table-date am-hide-sm-only">拼团价格</th>
                    <th class="table-set">任务状态</th>
                    <th class="table-set">定时时间</th>
                    <th  class="table-title">操作</th>

                </tr>
                </thead>
                <tbody class="impowdith">





                </tbody>
            </table>

            <!--  <div class="am-btn-group am-btn-group-xs">
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 删除</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 上架</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 下架</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 移动</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 移动</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
              </div>-->



            <div id="Pagination" style="margin:20px auto" style="display:none"></div>

            <!--  <ul class="am-pagination am-fr">


              </ul>-->




            <hr />

        </form>



    </div>


    </div>
    </div>
    </div>

    <div class="foods">
        <ul>
            版权所有@2019.
        </ul>
        <dl>
            <a href="" title="返回头部" class="am-icon-btn am-icon-arrow-up"></a>
        </dl>
    </div>
    </body>
    </html>



    <script>


        laydate.render({
            elem: '.datapick1'
        });
        laydate.render({
            elem: '.datapick2'
        });




        var on_request=false;
        var type=1;
        var page=1;

        var base_url="<?php echo base_url();?>";


        $(".search_button").click(function () {
            gettasklist();
        });


        function setlisthtnml(data) {
            var html="";



            /*  <a class="am-btn am-btn-default am-btn-xs am-text-success am-round am-icon-file" data-am-modal="{target: '#my-popups'}" title="添加子栏目"></a>*/

            if(data.list.length>0){
                $.each(data.list, function (key, value) {

                    let  daifa='';
                    if(value.daifa){
                        daifa="是";
                    }

                    html=html+
                        '<tr><td><input type="checkbox" /></td>\n'+
                        '<td>'+value.id+'</td>\n'+
                        '<td class="mytd"><div style="width:300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">'+value.goods_name+'</div></td>\n'+
                        '<td>'+value.number+'</td>\n'+
                        '<td class="mytd">'+value.each_single+'</td>\n'+
                        '<td class="mytd"><div style="width:250px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">'+value.sku+'</div></td>\n'+
                        '<td class="mytd">'+daifa+'</td>\n'+
                        '<td>'+value.money+'</td>\n'+
                        '<td>'+value.gold+'</td>\n'+
                        '<td>'+value.pay_type+'</td>\n'+
                        '<td>'+value.single_price+'</td>\n'+
                        '<td>'+value.group_price+'</td>\n'+
                        '<td>'+value.status+'</td>\n'+
                        '<td>'+value.releasetime+'</td>\n'+
                        '<td >'+
                        '<div class="tbody_action">'+
                        '<div><a href="'+base_url+'business/viewpddtask/'+value.id+'">查看任务</a></div>'+
                        '<div><a   class="green" href="'+base_url+'business/order_list/'+value.id+'">子任务列表</a></div>'+
                        '<div ><a  class="red"  href="'+base_url+'business/relodpddtask/'+value.id+'">重新发布</a></div></div>'+
                        ''+
                        '</td></tr>';
                });




                $(".impowdith").html(html);
                $('#Pagination').show();
                $("")
            }else{
               html += '<div style="width:100%;text-align:center;">暂无数据</div>';
                $(".impowdith").html(html);
                $('#Pagination').hide();
            }


            /*   $(".showtilog").click(function () {

                   document.getElementById('body').innderHTML = '<div class="am-dimmer am-active" data-am-dimmer="" style="display: block;"></div>';


                   $("#my-popups").show();
               });*/

        }


        gettasklist();
        function gettasklist() {
            var url = "<?php echo base_url(); ?>/Business/GetPDDTaskList";

            var date1=$("input[name='date1']").val();
            var date2=$("input[name='date2']").val();
            var postdata = {
                'date1': date1,
                'date2': date2,
                'page': page,
                'epage': 10
            };
            layer.msg("数据加载中", {
                icon: 16, //代表加载的图标
                time: 3,  //0秒关闭（如果不配置，默认是3秒）
                shade: 0.5    });
            $.post(url, postdata, function (data) {
                window.layer.closeAll();

                setlisthtnml(data);
                setPagination("Pagination", data.count, page, data.epage, function (clickPage) {
                    page = parseInt(clickPage) + 1;
                    gettasklist();
                });
            },'json');

        }





    </script>







